GrapeCity.Win.Spread.InputMan.CellType.GcMaskCellType gcMask = new GrapeCity.Win.Spread.InputMan.CellType.GcMaskCellType();
gcMask.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.AllArrows;
gcMask.AcceptsCrLf = GrapeCity.Win.Spread.InputMan.CellType.CrLfMode.Filter;
gcMask.AcceptsTabChar = GrapeCity.Win.Spread.InputMan.CellType.TabCharMode.Filter;
gcMask.AlternateText.DisplayNull.ForeColor = Color.Red;
gcMask.AlternateText.DisplayNull.Text = "Display Null";
gcMask.AlternateText.Null.ForeColor = Color.Red;
gcMask.AlternateText.Null.Text = "Null value";
gcMask.AutoConvert = true;
GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskLiteralFieldInfo mlf = new GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskLiteralFieldInfo("{{: ");
mlf.BackColor = Color.Aqua;
mlf.ForeColor = Color.Black;
mlf.Margin = new System.Windows.Forms.Padding(4);
mlf.Name = "MaskLiteralFieldInfo";
mlf.Font = SystemFonts.DefaultFont;
GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskPatternFieldInfo mpf = new GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskPatternFieldInfo("\\D{3}\\-\\D{4}", 7, 7);
mpf.AutoConvert = true;
mpf.BackColor = Color.Beige;
mpf.ForeColor = Color.DarkOliveGreen;
mpf.Font = SystemFonts.DefaultFont;
mpf.Name = "MaskPatternFieldInfo";
mpf.Padding = new System.Windows.Forms.Padding(3);
mpf.PasswordChar = '*';
mpf.PromptChar = '|';
mpf.Text = "MaskPatternFieldInfo_Text";
mpf.UseSystemPasswordChar = true;
GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskLiteralFieldInfo mlf2 = new GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskLiteralFieldInfo("}}: ");
mlf2.BackColor = Color.Aqua;
mlf2.ForeColor = Color.Black ;
mlf2.Margin = new System.Windows.Forms.Padding(4);
mlf2.Name = "MaskLiteralFieldInfo2";
mlf2.Font = SystemFonts.DefaultFont;
GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskEnumerationFieldInfo mef = new GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskEnumerationFieldInfo(new string[] { "item1", "item2", "item3", "item4" });
mef.AutoConvert = true;
mef.AutoDropDown = true;
mef.BackColor = Color.CadetBlue;
mef.DropDownEnabled = true;
mef.ForeColor = Color.Red;
mef.PromptChar = '|';
mef.SpinIncrement = 1;
mef.Text = "MaskEnumerationFieldInfo";
mef.Font = SystemFonts.DefaultFont;
gcMask.Fields.AddRange(new GrapeCity.Win.Spread.InputMan.CellType.Fields.MaskFieldInfo[] { mlf, mpf, mlf2, mef });
gcMask.PaintByControl = true;
gcMask.PromptChar = '#';
gcMask.RecommendedValue = "1234567item1";
gcMask.ShowRecommendedValue = true;
gcMask.SideButtons.Add(new GrapeCity.Win.Spread.InputMan.CellType.SpinButtonInfo());
gcMask.Spin.AllowSpin = true;
gcMask.Spin.Increment = 1;
gcMask.Spin.SpinOnKeys = true;
gcMask.Spin.SpinOnWheel = true;
gcMask.Spin.Wrap = true;
gcMask.UseSpreadDropDownButtonRender = true;
fpSpread1.ActiveSheet.Cells[0, 0].CellType = gcMask;